#pragma once

#include <QtWidgets/QMainWindow>
#include "ui_StudyQWebEngineUrlScheme.h"
#include "AMUrlSchemeHandler.h"


class AMUrlRequestInterceptor : public QWebEngineUrlRequestInterceptor
{
    Q_OBJECT
public:
    AMUrlRequestInterceptor(QObject* p = nullptr);
    ~AMUrlRequestInterceptor();

    virtual void interceptRequest(QWebEngineUrlRequestInfo& info);
};



class StudyQWebEngineUrlScheme : public QMainWindow
{
    Q_OBJECT

public:
    StudyQWebEngineUrlScheme(QWidget *parent = Q_NULLPTR);

public slots:
    void sltBtnPostClicked();
    void sltBtnOtherClicked();
    void sltBtnGetClicked();
private:
    Ui::StudyQWebEngineUrlSchemeClass ui;

    QWebEngineView* m_pView{nullptr};
};
